package com.fjec.market.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjec.market.entity.BizSubPhysicalOrder;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 042.实物子订单表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2020-09-21
 */
public interface BizSubPhysicalOrderMapper extends BaseMapper<BizSubPhysicalOrder> {

    /**
     * 统计订单数量，金额
     *
     * @param startTime
     * @return
     */
    List<Map<String, Object>> statSubOrderNum(@Param("startTime") LocalDateTime startTime,
                                              @Param("endTime") LocalDateTime endTime);

    List<Map<String, Object>> getSignedSubOrders(@Param("busiId") Long busiId, Page page);

    int getNumToDivide(@Param("busiId") Long busiId);

    void setDistStatusAccounted(@Param("paymentId") Long paymentId);
}
